
capture rm "${path_tables}/table_CLAN_${g}_treated.tex"
texdoc init "${path_tables}/table_CLAN_${g}_treated.tex"


tex	\begin{tabular}{>{}L{9cm}%
tex >{}S[table-format=2.2]%
tex >{}S[table-format=2.2]%
tex >{}S[table-format=2.2]} \toprule

tex & {25\% Least} & {25\% Most} & {Difference} \\ \midrule
	
local i = 1

if  ${n_selected} > 0 {

	foreach v of global vs_selected {
	
		tex ${lab_`v'1} ${lab_`v'2} & ${CL1_${g}_`v'_t} &  ${CL4_${g}_`v'_t} &  ${CLd_${g}_`v'_t} \\ 
		tex  &  {(${CL1_ll_${g}_`v'_t}, ${CL1_ul_${g}_`v'_t})} & {(${CL4_ll_${g}_`v'_t}, ${CL4_ul_${g}_`v'_t})}  & {(${CLd_ll_${g}_`v'_t}, ${CLd_ul_${g}_`v'_t})}  \\

		if `i' < ${n_selected} {
	
			tex  & &  & {[${CLd_p_${g}_`v'_t}]} \\ \addlinespace	
	
		}
	
		else if `i' == ${n_selected} {
	
			tex & &  & {[${CLd_p_${g}_`v'_t}]} \\ \bottomrule	
	
		}


		local i = `i' + 1

	}

}

else {

	tex \multicolumn{4}{l}{\emph{No statistically significant differences.} } \\ \bottomrule	

}






tex \end{tabular} 
texdoc close



